import { View, Text, ViewProps } from "@tarojs/components";
import { PropsWithChildren } from "react";
import style from "./index.module.scss";

interface TextProps extends ViewProps {
  color?: string;
}

const WrappingText = ({
  children,
  color,
  ...props
}: PropsWithChildren<TextProps>) => {
  return (
    <View {...props}>
      <Text style={{ color }} className={style["wrapping-text"]}>
        {children}
      </Text>
    </View>
  );
};

export default WrappingText;
